-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add arch and platform detection for mssql sessions #19112
add arch and platform detection for mssql sessions #19112
Conversation
1f1b46f
to
ff56e6f
Compare
lib/rex/proto/mssql/client.rb
Outdated
result[:arch] = ARCH_X86_64 | ||
result[:platform] = server_vars[:rows][0][0].match?('Windows') ? Msf::Platform::Windows.realname : Msf::Platform::Linux.realname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be good to follow the pattern of the other PRs (postgres+mysql), as well as adding tests (following the pattern of the postgres PR) 👍
ff56e6f
to
777a065
Compare
lib/rex/proto/mssql/client.rb
Outdated
elsif os_data.match?('win') | ||
platform = Msf::Platform::Windows | ||
else | ||
platform = Msf::Platform::Unknown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think instead of unknown
we'll just default to the string that the server gives back. We'll need to update the mysql logic here for consistency
lib/rex/proto/mssql/client.rb
Outdated
elsif arch_data.match?('32-bit') | ||
arch = ARCH_X86 | ||
else | ||
arch = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think instead of unknown
we'll just default to the string that the server gives back. We'll need to update the mysql logic here for consistency
777a065
to
8eb5f45
Compare
8eb5f45
to
5c89b6a
Compare
70a6624
to
0c6af95
Compare
Release NotesAdds architecture and platform detection for MSSQL sessions. |
This adds platform and arch detection to MSSQL
To test:
mssql_login
module withcreatesession=true
sessions
commandBefore:
After: